package com.principle.inverse;

public class DependecyInversion {
    public static void main(String[] args) {

    }
}

class Email {
    public String getInfo(){
        return "电子邮件信息：hello,world";
    }
}

// 完成Person接收消息的功能
// 方式1
class Person {
    public void receive(Email email){
        System.out.println(email.getInfo());
    }
}